package com.xbongbong.saas.service;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.instockproduct.pojo.dto.InstockProductDeleteBatchDTO;
import com.xbongbong.pro.instockproduct.pojo.dto.InstockProductListDTO;
import com.xbongbong.pro.instockproduct.pojo.vo.InstockProductDeleteBatchVO;
import com.xbongbong.pro.instockproduct.pojo.vo.InstockProductListVO;
import com.xbongbong.saas.domain.entity.InstockProductEntity;
import com.xbongbong.saas.domain.entity.ProductStockUpdateEntity;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 产品库存
 * @author Jian.Wang
 * @date 2019/2/21 15:51
 * @since v1.0
 * @version v1.0
 */
public interface InstockProductService {
    /**
     * 入库单产品数据查询多个
     * @param param 参数
     * @author Jian.Wang
     * @date 2019/1/23 20:27
     * @since v1.0
     * @return List
     */
    List<InstockProductEntity> findEntitys(Map<String, Object> param);


    /**
     * 批量删除入库单产品
     * @author 吴峰
     * @date 2019/2/28 20:54
     * @param instockProductDeleteBatchDTO
     * @return com.xbongbong.pro.instockproduct.pojo.vo.InstockProductDeleteBatchVO
     * @throws XbbException 业务异常
     */
    InstockProductDeleteBatchVO deleteBatchByInstockIdIn(InstockProductDeleteBatchDTO instockProductDeleteBatchDTO) throws XbbException;

    /**
     * 获取入库单产品
     * @author 吴峰
     * @date 2019/3/4 22:40
     * @param instockProductListDTO
     * @return com.xbongbong.pro.instockproduct.pojo.vo.InstockProductListVO
     * @throws XbbException 业务异常
     */
    InstockProductListVO findInstockProductList(InstockProductListDTO instockProductListDTO) throws XbbException;

    /**
     * 更新库存
     * @param corpid
     * @param
     * @return
     */
    Map<Long, ProductStockUpdateEntity> delUpdateStock(List<InstockProductEntity> instockProductList, String corpid, boolean isFormOri, Set<Long> disableBatchProducts) throws XbbException;

    Map<Long, ProductStockUpdateEntity> addUpdateStock(List<InstockProductEntity> addInstockProductEntityList, String corpid, Boolean isFromOri) throws XbbException;


}
